namespace AutoTest.Test
{
    using System;
    using Moq;

    public abstract class MockingBase : IDisposable
    {
        protected MockFactory Factory { get; private set; }

        protected MockingBase(MockBehavior behavior)
        {
            Factory = new MockFactory(behavior);
        }

        protected MockingBase() : this(MockBehavior.Default)
        {
        }

        public void Dispose()
        {
            Factory.VerifyAll();
        }
    }
}